why use comma's, when without works just fine

This commit is contained in:
Wannes-Sys 2023-06-24 19:51:58 +00:00
parent cd1a838267
commit ea365e2509
1 changed files with 22 additions and 0 deletions

22
string_and_bytes.py Normal file
View File

@ -0,0 +1,22 @@
# just why?
print("a" "b" "c")
a = "a" "b" "c"
print(a)
# even works with bytes
print(b"a" b"b" b"c")
b = b"a" b"b" b"c"
print(b)
# Look what I found, a way to edit your bytes ig. Or at least setitem.
c = bytearray(b"Hello, World!")
print(c)
# has to be integer for some reason
c[1] = 101
print(c)
# I mean, editable strings, something we've always wanted
print(c.lower())
print(c.upper())
print(c.split())
print(c.find(b"o"))
# and it has all string methods too