How to print every second character of a string in Python

1 Answer

0 votes
s = "python c java c++ php c#"

every_second = s[::2]
print(every_second)


'''
run:

pto  aac+ppc

'''

 



answered Dec 2, 2017 by avibootz

Related questions

...