Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

String Split maximum splits function changed #37

Open
ddtweedy opened this issue Sep 21, 2022 · 0 comments
Open

String Split maximum splits function changed #37

ddtweedy opened this issue Sep 21, 2022 · 0 comments

Comments

@ddtweedy
Copy link

Using Python 3.10.7 with syntax of: mysplitstr = 'string'.split(',')[4]
'string' example [ '1, 2, 3, 4, 5ormore']
script execution of string'.split(',')[4] returns [ '5ormore' ]
More experimenting indicates the function of [max split] is selection of returned value.
Split uses index starting at 0 based so string example has 4 items.
When [max split] is larger than number of split items an exception occurs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant