How to print the second letter of every word in a string in Python

1 Answer

0 votes
s = "Python is an interpreted general purpose programming language"
 
for word in s.split():
    print(word[1])

 


     
'''
run:
     
y
s
n
n
e
u
r
a
 
'''

 



answered Nov 2, 2021 by avibootz

Related questions

...