Code Yarns ‍👨‍💻
Tech BlogPersonal Blog

Python: Split Long Lines

📅 2010-Jan-28 ⬩ ✍️ Ashwin Nanjappa ⬩ 🏷️ python ⬩ 📚 Archive

Use backslash to split long lines of code

if anUnusuallyLongVariable == 3 \
    and aSecondUnusuallyLongVariable == 5 \
    and aThirdLongVariable == 7:
    print("You need a split!")

© 2023 Ashwin Nanjappa • All writing under CC BY-SA license • 🐘 Mastodon📧 Email