0

It print the list how I want it but I want them next to each other on the same line instead of on different lines. The inputs that I am using are abcdefghi and jklmnopqr

str1 = (input("please enter a string: "))
str2 = (input("please enter a string: "))

for i in range(0, len(str1)):
  e = str1[i] + str2[i]
  print(e)

I want it to print something like: ajbkclemdnfogphqir

but it prints it like this:

aj

bk

cl

em

dn

fo

gp

hq

ir
Andrey Tyukin
  • 43,673
  • 4
  • 57
  • 93
S.Dileep
  • 13
  • 3

1 Answers1

0
str1 = (input("please enter a string: "))
str2 = (input("please enter a string: "))

e = ' '
for i in range(0, len(str1)):
  e = e + str1[i] + str2[i]
print(e)

Hope it will be helpfull

Samuel
  • 182
  • 9