❤️
Noob Coding
  • Noob Coding
  • Languages
    • PHP (Laravel)
    • Python
    • Fluent Python
  • Topics
    • Computer Networks
    • Designing Data-Intensive Applications
    • Information Retrieval
      • Ad Hoc Retrieval
      • Classification and Clustering
    • Operating Systems
    • Parallel Programming
Powered by GitBook
On this page
  • Dictionary
  • String
  • Debug

Was this helpful?

  1. Languages

Python

PreviousPHP (Laravel)NextFluent Python

Last updated 5 years ago

Was this helpful?

Dictionary

  • Check key exists in dictionary dict: if key in dict:

  • How to iterate: .

String

  • Trimming:

s = s.strip()
s = s.lstrip()
s = s.rstrip()
  • Replace:

s = s.replace('\t', ' ')

Debug

  • str vs repr: , .

a good tutorial
https://www.geeksforgeeks.org/str-vs-repr-in-python/
https://stackoverflow.com/questions/1436703/difference-between-str-and-repr