For long enough I have used to print out a python list as below:

a = [1,2,3]

Which is kind of working but without printing it in a nice format. So after experimenting I find a cleaner way to do it:

a = [1,2,3]

Tuple behave similarly:

a = (1,2,3)

a = (1,2,3])

πŸš€ For people who like video courses and want to kick-start a career in data science today, I highly recommend the below video course from Udacity:

Learn to Become a Data Scientist Online | Udacity | Udacity
Gain real-world data science experience with projects from industry experts. Take the first step to becoming a data scientist. Learn online, with Udacity.

πŸ“š While for book lovers:


This brings us to the end of this article. Hope you like this Python trick.

β€ŒIf you liked this article, please consider subscribing to my blog. That way I get to know that my work is valuable to you and also notify you for future articles.β€Œ
β€ŒThanks for reading and I am looking forward to hearing your questions :)β€Œ
β€ŒStay tuned and Happy Machine Learning.β€Œ