Geek Culture
Published in

Geek Culture

I Added A List To Itself In Python And This Happened

This short article is a result of boredom, and doesn’t offer any useful knowledge. In Python, lists can contain any data type — integers, floats, strings, lists, dictionaries and so on.

list1 = [1, 3.14, "apple", True, [1,2], {"apple": "pie"}]

Curiosity led me to test if a list can contain itself:

list1 = [1, 2]…

--

--

--

A new tech publication by Start it up (https://medium.com/swlh).

Recommended from Medium

My experience @ MDA

New Gamified HODL Feature

Subsquid Dev Log #6

A Case for Delta Live Table as the Workflow for Lakehouse — Integrating Source Data

Kambria Development Update — April 2019

This happens when you type gcc main.c. Totally not written by Gucci Mane.

The State of Data Engineering in 2021

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Zlliu

Zlliu

Full-time Software Engineer. Part-time Python Tutor, Tech Writer & Crypto Investor. Free-time pianist, gamer, gardener & self-proclaimed cook

More from Medium

__new__ vs __init__ in Python, a most known resource!

4 Ways To Annoy Your Colleagues With Your Python Code

Meet Enums: The Hidden Power of Python

Python is deprecating some old modules in their 3.13 version of the language