num = '123456789'
for i in num[::-1][::2]:
print(i)
Output –
9
7
5
3
1
More Related Contents:
- Remove string in python dictionary value
- how to do such calculation task in pandas?
- Equivalent of shell ‘cd’ command to change the working directory?
- How to get a function name as a string?
- List comprehension and lambdas in Python [duplicate]
- How can I show explosion image when collision happens?
- How can I perform two-dimensional interpolation using scipy?
- Cross-platform space remaining on volume using python
- How to add a new row to an empty numpy array
- Python Pandas update a dataframe value from another dataframe
- Apply fuzzy matching across a dataframe column and save results in a new column
- Using Numpy stride_tricks to get non-overlapping array blocks
- Python script as linux service/daemon
- Understanding the main method of python [duplicate]
- python dataframe pandas drop column using int
- What is the difference between multiprocessing and subprocess?
- How to aggregate unique count with pandas pivot_table
- Writing List of Strings to Excel CSV File in Python
- ImportError: No module named ‘MySQL’
- python: unicode in Windows terminal, encoding used?
- Ampersand “&” syntax error running any Python script in VSCode?
- Django 1.9 deprecation warnings app_label
- Double donut chart in matplotlib
- Where is site-packages located in a Conda environment?
- Python super and setting parent class property
- Opening pdf urls with pyPdf
- Combine two Pyplot patches for legend
- How is the Keras Conv1D input specified? I seem to be lacking a dimension
- sql.h not found when installing PyODBC on Heroku
- printing stdout in realtime from a subprocess that requires stdin