How to iterate over words of string in Python

1 Answer

0 votes
s = 'python java c c++ php'

splits = s.split()

for word in splits:
	print(word)



'''
run:
    
python
java
c
c++
php

'''

 



answered Oct 28, 2020 by avibootz

Related questions

3 answers 279 views
3 answers 178 views
2 answers 219 views
1 answer 120 views
2 answers 223 views
1 answer 173 views
1 answer 174 views
...