Code Yarns ‍👨‍💻
Tech BlogPersonal Blog

Python: Picking certain elements of a tuple returned by function

📅 2009-Oct-01 ⬩ ✍️ Ashwin Nanjappa ⬩ 📚 Archive

Problem: How to pick only first & third parts of 3-tuple returned by str.partition()?

part0, _, part2 = str.partition(' ')