Contact
Privacy
Coding Development Art
  • Home
  • Latest
  • Oldest
  • Popular
  • Random
  • Home»
  • Categrories»
  • Programming Languages»
  • Python»

Write a program to swap first and last elements in a list - Python

Categories:
Python
Viewed: 5 - Published at: a few seconds ago

[ Write a program to swap first and last elements in a list ]

my_list = [1, 2, 3, 4, 5, 6]
my_list[0], my_list[-1] = my_list[-1], my_list[0]

Related Posts:

C/C++ TIC-TAC-TOE GAME
C/C++ TIC-TAC-TOE GAME
C++ Programs
How to Find Best Free Data Recovery Solution for Windows
How to Find Best Free Data Recovery Solution for Windows
Review
Android Upload Image to Server Using Volley
Android Upload Image to Server Using Volley
Android
Reading and Writing JSON to a File in Python
Reading and Writing JSON to a File in Python
Python
Android Navigation Drawer Tutorial
Android Navigation Drawer Tutorial
Android
The Future of App Development – Amazon AppStream
The Future of App Development – Amazon AppStream
Mobile

You may also like:

Java 8: How to Convert a Map to List
Java 8: How to Convert a Map to List
Java
Save Plot as Image with Matplotlib
Save Plot as Image with Matplotlib
Python
So You Want To Be An Ironman
So You Want To Be An Ironman
News
Help (or advice) me get started with lxml
Help (or advice) me get started with lxml
Python
Angular Form Validation
Angular Form Validation
JavaScript
How To Get User's IP Address Using Flask?
How To Get User's IP Address Using Flask?
Python
Categories
  • Blog
    • Career
    • Computer
    • Downloads
    • Internet
    • Linux
    • News
    • Review
    • Security
    • Technology
  • Database
    • MySql
    • Oracle Database
    • SQL Server
    • SQLite
    • mongodb
  • Dev
    • Algorithm
    • Android
    • Batch File Programming
    • Books
    • Competitive Programming
    • Computer Networks
    • Data Structure
    • Design
    • Development
    • Flutter
    • Game
    • Git
    • Interview Questions
    • JDBC
    • Machine Learning
    • Mobile
    • Operating System
    • Programming
    • Projects
    • Sponsored
    • Webservice
    • iOS
  • Framework
    • .NET
    • Angular
    • Django
    • MVC
    • Nodejs
    • React
  • Programming Languages
    • ASP.NET
    • C Programs
    • C#
    • C++ Programs
    • CSS
    • HTML
    • JSP
    • Java
    • JavaScript
    • PHP
    • PL/SQL
    • Python
    • SQL
    • Swift
    • VB.NET
  • Tools
    • privacy-policy-generator
    • Mac Vendors
    • Ports Numbers
    • Wifi Routers Passwords

Site all the data, are collected from Internet, belongs to original author, please do not used for commercial purposes !

Coding Development Art
  https://www.codevelop.art
 
  contact@codevelop.art

Posts

  • Home
  • Latest
  • Oldest
  • Popular
  • Random

Follow Us

© 2018 codevelop.art - Coding Develop Art - programming and development tutorials blog - Learn all Program languages | codevelop.art.
All Rights Reserved.
  • Contact
  • Privacy
  • Terms of service
  • Copyright
  • Disclaimer