how can we use for loop to assign two values from the string like following
string="abcd"
for i in string:
print(i)
this will give i one value from the string
#output
a
b
c
d
how can i take two values like ab and cd. I know we can do this in print but i need to assign two values in "i" I need output
#output
ab
cd