Skip to content

Noted an issue while using input() #118637

Closed as not planned
Closed as not planned
@chandra122

Description

@chandra122

Bug report

Bug description:

Version used: python3.10 with venv -
PythonPractice

value = int(input())
# Trying to pass an integer value from command prompt ex: 4 throws

Traceback (most recent call last):
  File "D:\PythonPractice\Algorithms And Data Structures\linearsearchexamples.py", line 13, in <module>
    value = int(input().strip())
            ^^^^^^^^^^^^^^^^^^^^
ValueError: invalid literal for int() with base 10: ''

CPython versions tested on:

3.10

Operating systems tested on:

Windows

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions