the 2 modes of python's str.split (beginner) anthony explains #232

the 2 modes of python's str.split (beginner) anthony explains #232

anthonywritescode

3 года назад

1,064 Просмотров

today I show how `str.split` works (and how it oddly has two quite-different modes of execution)

playlist: https://www.youtube.com/playlist?list=PLWBKAf81pmOaP9naRiNAqug6EBnkPakvY

==========

twitch: https://twitch.tv/anthonywritescode
dicsord: https://discord.gg/xDKGPaW
twitter: https://twitter.com/codewithanthony
github: https://github.com/asottile
stream github: https://github.com/anthonywritescode

I won't ask for subscriptions / likes / comments in videos but it really helps the channel. If you have any suggestions or things you'd like to see please comment below!
Ссылки и html тэги не поддерживаются


Комментарии:

SnowxCone
SnowxCone - 13.12.2021 11:02

thank youuu!! i needed this for advent of code this year, super helpful :)

Ответить
yates
yates - 10.02.2021 15:04

Perhaps a video about PEP 634? Would love to hear your thoughts about it.

Ответить
Yevhenii Kovalchuk
Yevhenii Kovalchuk - 09.02.2021 22:21

Sometimes I need to split using no_args_split AND some other symbol. I wish there was an easy way to do that! So most of the time I end up using re.split. :(

Ответить
Tushar Sadhwani
Tushar Sadhwani - 09.02.2021 22:13

wouldn't split_like_no_args give wrong results if we had 4 or 6 spaces at the end of the string? because in that case you get 2 or 3 empty strings in your split result list.

Ответить