repl.it
@sclanc20/

5.1. Strings: Slices

Python

No description

fork
loading
Files
  • main.py
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# Hint: Check this tutorial: https://snakify.org/lessons/strings_str/steps/1/
# Read a string:
# s = input()
# Print a string:
# print(s)

s = input()
print(s[2])
print(s[-2])
print(s[0:5])
print(s[0:-2])
print(s[0::2])
print(s[1::2])
print(s[::-1])
print(s[::-2])
print(len(s))
Fetching token
?