new92 / InstaTools

🧰 A collection of tools used for automating tasks on Instagram 📱| Written in Python 🐍 | Don't forget to ⭐ the repo !
https://github.com/new92/InstaTools
MIT License
115 stars 23 forks source link

Optimized sub-optimal code #13

Closed ghost closed 11 months ago

ghost commented 11 months ago

Made the following changes:

-> converted un-changed lists into tuples for better runtime & memory savings. -> replaced quit() by sys.exit(). -> created a constant 'EMPTY' for storing repeating tuple occurrences. -> removed unnecessary '!=0' & '==0' references in conditional statements. -> removed str conversion after input as if already returns a string. -> switched .lower().strip() -> .strip().lower() for better performance. -> some other minor optimizations.