TGViewer
Machine Learning & Artificial Intelligence | Data Science Free Courses Machine Learning & Artificial Intelligence | Data Science Free Courses @datasciencefree · 68.6K subscribers
Post #2259 6.74K
📱Cheat sheet on string methods in Python

1. Makes the first letter capitalized
.capitalize()


2. Lowers or raises the case of a string
.lower()
.upper()


3. Centers the string with symbols around it: 'Python' → 'Python'
.center(10, '*') 


4. Counts the occurrences of a specific character
.count('0')


5. Finds the positions of specified characters
.find()
.index()


6. Searches for a desired object and replaces it
.replace()


7. Splits the string, removing the split point from it
.split()

8. Checks what the string consists of
.isalnum()
.isnumeric()
.islower()
.isupper()
  • ❤ 9
  • 👍 2
More from @datasciencefree
  1. Sep 27, 2026Machine Learning Roadmap | |-- Fundamentals | |-- Mathematics | | |-- Linear Algebra | | |…
  2. Sep 24, 2026🚀 𝐁𝐞𝐜𝐨𝐦𝐞 𝐚𝐧 𝐀𝐈 𝐄𝐧𝐠𝐢𝐧𝐞𝐞𝐫 𝐢𝐧 𝟐𝟎𝟐𝟔 🎯 Choose Your Learning Track: 💻…
  3. Sep 23, 2026Machine Learning Roadmap
  4. Sep 23, 2026SQL & Python Cheatsheet for Beginners ❤️
  5. Sep 22, 2026#Ad #AI_Models 🔥 GigaChat 3.5 Reasoning [Open-Source] ℹ️ Overview: New LLM that thinks be…
  6. Sep 22, 2026✅ Programming Languages, Libraries & Tools Every Tech Field Uses 👨‍💻🚀 🧠 DATA SCIENCE &…
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →