Skip to content

Fix incorrect string to int conversion example#917

Open
nidhi-sridhar wants to merge 1 commit into
Asabeneh:masterfrom
nidhi-sridhar:patch-1
Open

Fix incorrect string to int conversion example#917
nidhi-sridhar wants to merge 1 commit into
Asabeneh:masterfrom
nidhi-sridhar:patch-1

Conversation

@nidhi-sridhar

Copy link
Copy Markdown

The example attempts to convert the string "10.6" directly using int(num_str), which raises a ValueError.

This PR updates the example to use the already converted integer value so the code executes successfully and matches the explanation.

Fixes the example where int(num_str) raises a ValueError for "10.6". Uses the converted integer value instead.
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

Successfully merging this pull request may close these issues.

1 participant