仝相杰 发表于 2017-9-9 09:14:41

str1 = 'IloveFishC.com'
print(*str1,sep="\n"")

仝相杰 发表于 2017-9-9 09:15:22

仝相杰 发表于 2017-9-9 09:14
str1 = 'IloveFishC.com'
print(*str1,sep="\n"")

多打了一个标点符号,不过不影响结果

barret 发表于 2017-9-9 11:12:36

好好学习天天向上

蓝色披风 发表于 2017-9-9 11:47:06

print(*'IloveFishC.com', sep='\n')

lihuayuan 发表于 2017-9-9 15:52:20

6666

Tianhe 发表于 2017-9-9 19:13:00

str1 = 'IloveFishC.com'
for i in str1:
    print(i,end='\n')



结果
>>> ================================ RESTART ================================
>>>
I
l
o
v
e
F
i
s
h
C
.
c
o
m
>>>

AKA2pac 发表于 2017-9-9 21:37:18

str1 = 'ILoveFishC.com'
for i in str1:
    print(i+'\n')

谁动了我的豆包 发表于 2017-9-9 22:50:17

print('\n'.join(str1))

print(*str1, sep='\n')
会的人简单讲一下啦!!!

cuzz_py 发表于 2017-9-9 23:04:06

答案

zxb096 发表于 2017-9-10 06:20:38

学习一下答案

水稻 发表于 2017-9-10 09:05:11

不用循环语句儿怎么做看看答案

陈工 发表于 2017-9-10 09:18:15

看看

起司的喵 发表于 2017-9-10 09:55:28

绝世好文,不得不顶

lovekill 发表于 2017-9-10 11:51:41

for ...in...

annaanna 发表于 2017-9-10 13:49:19

kankan

w27482797 发表于 2017-9-10 15:04:08

虽然不用,但还是支持了!!

我家七只海豚 发表于 2017-9-10 16:16:18

print(*'IloveFishC.com', sep='\n')

天天叫天天 发表于 2017-9-10 18:20:34

a = "IloveFishC.com"
b = a.replace('','\n')
print b

消逝牛刀 发表于 2017-9-10 19:25:21

1

takki 发表于 2017-9-10 20:01:00

str1 = 'IloveFishC.com'
print('\n'.join(str1))
页: 1 2 3 [4] 5 6 7 8 9
查看完整版本: Python:每日一题 90(答题领鱼币)