Home > other >  Novice question, please answer!!!!!
Novice question, please answer!!!!!

Time:10-30

I have an idea, is want to allow the user to input a sentence, then you can print out the second and fourth word,
Listen to another bosses can use split function to do, but I am too food, do not to come out,
Thank you!!!!!

CodePudding user response:

 
Sentence=input (" please enter the word ")
Words=sentence. The split ()
If len (words) & gt;=4:
Print (words [1]) # second
Print (words [3]) # 4

  • Related