@misingnoglic/

Fun with Strings

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
17
18
s = "hello"
s2 = " world"
s3 = s + s2
print(s3)

print(s3[1:4])
print(s3[1:-1])
print(s3[1:])

for letter in s3:
	print(letter)
	
print(len(s3))

print("e" in s3)
print("x" in s3)

print(sorted(s3))