bbelderbos,
@bbelderbos@fosstodon.org avatar

#Python #tip: split("\n") usually gets you what you want.

But why not use splitlines() 🐍 in case strings contain different types of line endings? 📈

It's worth double-checking the string methods (and the Standard Library overall), oftentimes there's a more robust solution.💡😍

  • All
  • Subscribed
  • Moderated
  • Favorites
  • python
  • DreamBathrooms
  • ngwrru68w68
  • modclub
  • magazineikmin
  • thenastyranch
  • rosin
  • khanakhh
  • InstantRegret
  • Youngstown
  • slotface
  • Durango
  • kavyap
  • mdbf
  • GTA5RPClips
  • provamag3
  • ethstaker
  • normalnudes
  • tester
  • osvaldo12
  • everett
  • cubers
  • tacticalgear
  • anitta
  • megavids
  • Leos
  • cisconetworking
  • JUstTest
  • lostlight
  • All magazines