You are doing the casting at the wrong place.
Remove the int()
cast, bring it outside the input()
l1 = int(input('enter the length:'))
l2 = int(input('enter the breadth'))
That would fix it.
More Related Contents:
- find all possible combinations of letters in a string in python [duplicate]
- How do I get a substring of a string in Python?
- How to read a file line-by-line into a list?
- How to check if a string is a substring of items in a list of strings?
- Convert a Unicode string to a string in Python (containing extra symbols)
- How to get a function name as a string?
- Is there a simple way to remove multiple spaces in a string?
- Check if a string contains a number
- How to correctly sort a string with a number inside? [duplicate]
- How to un-escape a backslash-escaped string?
- Python 2.7 getting user input and manipulating as string without quotations
- Why are empty strings returned in split() results?
- Check if string ends with one of the strings from a list
- What is the most efficient string concatenation method in Python?
- What is the max length of a Python string?
- Difference between using commas, concatenation, and string formatters in Python
- How can I extract keywords from a Python format string?
- Converting a string that represents a list, into an actual list object
- Python: find closest string (from a list) to another string
- How to search if dictionary value contains certain string with Python
- How to concatenate (join) items in a list to a single string
- “TypeError: a bytes-like object is required, not ‘str'” when handling file content in Python 3
- How can I use f-string with a variable, not with a string literal?
- Using Python’s Format Specification Mini-Language to align floats
- How to get an expression between balanced parentheses
- Parsing json and searching through it
- f.read coming up empty
- How can I convert string values from a dictionary, into int/float datatypes?
- Fast string array – Cython
- Python replace function [replace once]