From e0cee401e32ee984f2b46f92d20f4cb60f452c34 Mon Sep 17 00:00:00 2001 From: fourgeeks Date: Wed, 17 Oct 2018 16:05:19 -0400 Subject: [PATCH] add string management --- __pycache__/string.cpython-36.pyc | Bin 0 -> 430 bytes string.py | 24 ++++++++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 __pycache__/string.cpython-36.pyc create mode 100644 string.py diff --git a/__pycache__/string.cpython-36.pyc b/__pycache__/string.cpython-36.pyc new file mode 100644 index 0000000000000000000000000000000000000000..a9fa1c21240f881bb2deb560f5312b669e6f078d GIT binary patch literal 430 zcmYjNy-ve05I#Ezl>SIeATf2#LIzfZfHE*t1yLp#EEBs;Xc9-ZBh(6}@CZBt3s1s3 zc;zjaxTF&8N#E!1{GIMjcQP1sKR>=7#{}R9wt}KQN0=id0fM~414tt1g6abaH4qTq z6hc2nzYXjFK4OG0*GPiAfrVEP^bl%7TK!CfC;XcJ=d|8<-j?>)S^&-nCaYeeGCmw# z+>LLhtKKkHxf)7ixp98uIGUtk;DS=8g>}1HmKl$w3o`X0wF|1UY@S$Eg$;?@F&69Q zU!eDJ&ELx?QMrs}s?u{Q7bdz=ah1!$nkeD%f?4$>HJjnM=yqunRoqur>6B;Dy3cXB zbbij$qPc+SBLVekpY9|2RQE7<9mbjp#wOwBr{K9{tX*P@x^4Ywu0)l|v$kh**3O_q F{s58IX`=uD literal 0 HcmV?d00001 diff --git a/string.py b/string.py new file mode 100644 index 0000000..e6c0362 --- /dev/null +++ b/string.py @@ -0,0 +1,24 @@ +def main(): + # string management + string = "hola CARLOS" + # conatenate + print(string+" como estas") + # replace + print(string.replace("hola", 'hi')) + # lower case + print(string.lower()) + # upper case + print(string.upper()) + # count + print(len(string)) + # find get the position of charater + # this method retunr -1 is string don't exist + print(string.find("hola")) + #split + # transform string into array depending on the chain + print(string.split(' ')) + + #TODO: https://www.programiz.com/python-programming/methods/string FOR MORE INFORMATION +if __name__ == '__main__': + main() + \ No newline at end of file