From ea365e250968abbef45745efa855133de98acf10 Mon Sep 17 00:00:00 2001 From: Wannes-Sys Date: Sat, 24 Jun 2023 19:51:58 +0000 Subject: [PATCH] why use comma's, when without works just fine --- string_and_bytes.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 string_and_bytes.py diff --git a/string_and_bytes.py b/string_and_bytes.py new file mode 100644 index 0000000..90f35c3 --- /dev/null +++ b/string_and_bytes.py @@ -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 \ No newline at end of file