我有两个字符串,需要连接字符串a的第0位置和字符串B的第0位置。
请查看输出格式。
a='Python is a programming language'
b='We have to practice'
# Need output in the format as below
Python We
is have
a to
programming practice
language
a='Python is a programming language'
b='We have to practice'
a=a.split()
b=b.split()
c=''
print(a)
print(b)
for i in a:
for j in b:
c=i+' '+j
print(c)
低于输出
Python practice
is practice
a practice
programming practice
language practice
1条答案
按热度按时间rslzwgfq1#
其中一个选项是
zip_longest
:输出: