TGViewer
Machine Learning with Python Machine Learning with Python @codeprogrammer · 68.6K subscribers
Post #4787 4.87K
📱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()


tags: #useful

➡ https://t.me/CodeProgrammer
  • ❤ 11
More from @codeprogrammer
  1. Oct 7, 2026A distinctive bot for subscribing to courses on the most popular educational platforms acr…
  2. Oct 7, 2026Understanding algorithms changes the way you write code. 🧠 This playlist teaches you exac…
  3. Oct 6, 2026🛠 Built an AI app with Cursor, Claude Code or Lovable? Publish it on Zibby (zibby.run), a…
  4. Oct 5, 2026🚀 ChatGPT Plus & Gemini AI Pro🤖 ChatGPT Plus — 1 Month: $8 ✨ Gemini AI Pro — 18 Months:…
  5. Oct 4, 2026I found a great resource for interactive learning about machine learning and AI – VizLearn…
  6. Oct 3, 2026This channels is for Programmers, Coders, Software Engineers. 0️⃣ Python 1️⃣ 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 →