线性搜索法

2024-05-08 11:49:03 发布

您现在位置:Python中文网/ 问答频道 /正文


Tags: python
1条回答
网友
1楼 · 发布于 2024-05-08 11:49:03

我知道你的问题这有点像黑客的问题


请看这个例子来阐明您的概念


y=list()
1). y=map(int,raw_input().split()) # for storing integer in list 
2). y=map(str,raw_input().split()) # for storing characters of string in list
#then use this to print the value 
for i in y:
    print i #this loop will print one by one value
#working example of this code is #for Second part
>>baby is cute #input
>>['baby','is','cute'] #output
>> #now according to your problem line is breaks into words

如果您觉得有用,请竖起大拇指

相关问题 更多 >

    热门问题