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

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

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

html - jQuery UI Sortable - Remove placeholder after item is dropped -