Very Useful Strings Slicing in Python. Python Tips ans Tricks

Published: 10 August 2022
on channel: Python 5
7,158
287

#shorts #python #programming #coding

s = "Shrek is Love"

print first 5 letters
print(s[0:5])

print without 4 last letters
print(s[:-4])

print every second letter
print(s[::2])

print reversed string
print(s[::-1])


Watch video Very Useful Strings Slicing in Python. Python Tips ans Tricks online without registration, duration hours minute second in high quality. This video was added by user Python 5 10 August 2022, don't forget to share it with your friends and acquaintances, it has been viewed on our site 7,158 once and liked it 287 people.