string - From list to sentence on python3 -


this question has answer here:

my mind,from:

>>>text='hi how you' >>>example=text.split() >>>print(example[0:4:2]) 

it print list

['hi', 'are']

my question, how convert them? list above, to:

>>> hi are

if got it, please answer.

text='hi how you' example=text.split() print(' '.join(example[0:4:2])) 

Comments

Popular posts from this blog

java - Andrioid studio start fail: Fatal error initializing 'null' -

android - Gradle sync Error:Configuration with name 'default' not found -

StringGrid issue in Delphi XE8 firemonkey mobile app -