From 1d49cde01dcdc22efdd1cccf6375b4f33177d182 Mon Sep 17 00:00:00 2001 From: Captain ALM Date: Wed, 30 Nov 2022 17:15:58 +0000 Subject: [PATCH] Test string ops --- main.py | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/main.py b/main.py index d4bf53c..9622c8f 100644 --- a/main.py +++ b/main.py @@ -1,10 +1,9 @@ #String tests -a = "hello world" -#[lw_inc:up_exc] -print(a[2:8]) -print(a[:8]) -print(a[2:]) -#From the end -print(a[-8:-2]) -print(a[-8:]) -print(a[:-2]) +a = " !Hello World! " +print(a.upper()) +print(a.lower()) +print(a.strip()) +#strip(str_of_targ) +print(a.strip((" !"))) +print(a.replace("H", "J")) +print(a.split(" "))