Even though it’s a homework question, you can do it as:
[a%10 for a in l]
More Related Contents:
- Sub-process in Python execute two task? [closed]
- How do I break an input into individual characters in python? [duplicate]
- input() error – NameError: name ‘…’ is not defined
- TypeError: ‘int’ object is not callable
- Reading a huge .csv file
- What is the most efficient way of finding all the factors of a number in Python?
- HTTP requests and JSON parsing in Python
- How to print a string at a fixed width?
- How to map numeric data into categories / bins in Pandas dataframe
- Python parse CSV ignoring comma with double-quotes
- How do I pass extra arguments to a Python decorator?
- Accessing attributes on literals work on all types, but not `int`; why? [duplicate]
- Securely storing environment variables in GAE with app.yaml
- Split string using a newline delimiter with Python [duplicate]
- Simplest way to plot 3d surface given 3d points
- Python write to a file returns empty file
- Python reading from a file and saving to utf-8
- RegEx Get string between two strings that has line breaks
- How do I check if raw input is integer in python 2.7?
- Is there a need to close files that have no reference to them?
- Write and read a list from file
- Flask broken pipe with requests
- Wait until task is completed on Remote Machine through Python [duplicate]
- Python json.loads changes the order of the object
- How can I understand a .pyc file content
- Why do I get “‘str’ object has no attribute ‘read'” when trying to use `json.load` on a string? [duplicate]
- Jupyter | The kernel appears to have died. It will restart automatically |
- ImportError: DLL load failed when importing Numpy installed in conda virtual environment
- How can I import files in Python using sys.path.append?
- How to handle IncompleteRead: in python