+ 1

Python beginners!

Python Beginners! What's the most interesting way you've used lists so far? I'm currently learning about lists in Python — like .append(), .remove(), slicing, etc. Curious: what's a small project or fun example where you used a list in a cool or creative way? I'd love to get inspired!

6th Jun 2025, 11:31 AM
Mink AKSEL
Mink AKSEL - avatar
12 Réponses
+ 3
A couple of ways I've used lists: https://sololearn.com/compiler-playground/cKpE9HWF59s3/?ref=app https://sololearn.com/compiler-playground/cI2bZvQU4SR0/?ref=app For practice you can attempt some of the Code Coaches available from the Community tab in app. Here is Camel to Snake Code Coach: https://www.sololearn.com/coach/82?ref=app My solution: https://sololearn.com/compiler-playground/crril0CGNTES/?ref=app Keep up the good work and happy coding!
6th Jun 2025, 3:18 PM
Keith
Keith - avatar
+ 1
Ruchit Gamit Welcome to Sololearn! As per the community guidelines, the Q&A Discussions forum is for coding questions and NOT general chat. If you have a coding question please start your own topic. Happy coding! https://www.sololearn.com/en/Content-Creation-Guidelines/
7th Jun 2025, 10:09 AM
Keith
Keith - avatar
+ 1
dream success Welcome to Sololearn! As per the community guidelines, the Q&A Discussions forum is for coding questions and NOT general chat. If you have a coding question please start your own topic. Happy coding! https://www.sololearn.com/en/Content-Creation-Guidelines/
8th Jun 2025, 1:51 AM
Keith
Keith - avatar
0
Haha, same here! 😅 I find lists super useful but still wrapping my head around things like slicing and nested lists. Got any mini project ideas to practice with?
6th Jun 2025, 12:35 PM
Mink AKSEL
Mink AKSEL - avatar
0
You can make a slot machine project
7th Jun 2025, 5:04 AM
Ahnaf Tahmid
Ahnaf Tahmid - avatar
0
Hey everyone
7th Jun 2025, 6:49 PM
dream success
dream success - avatar
0
Well let's find away
7th Jun 2025, 6:50 PM
dream success
dream success - avatar
0
import asyncio import random class Node: def __init__(self, node_id, peers): self.node_id = node_id self.peers = peers self.queue = asyncio.Queue() async def send_message(self, target_node, message): await target_node.queue.put((self.node_id, message)) async def receive_messages(self): while True: sender, message = await self.queue.get() print(f"Node {self.node_id} received '{message}' from Node {sender}") async def start(self): asyncio.create_task(self.receive_messages()) await asyncio.sleep(random.uniform(1, 3)) for peer in self.peers: await self.send_message(peer, f"Hello from Node {self.node_id}") async def main(): # Crear nodos nodes = [Node(i, []) for i in range(3)] # Asignar peers for node in nodes: node.peers = [peer for peer in nodes if peer != node] # Iniciar nodos await asyncio.gather(*(node.start() for node in nodes)) await asyncio.sleep(2)
7th Jun 2025, 9:51 PM
Rubén Isaac Palomino Rivasplata
Rubén Isaac Palomino Rivasplata - avatar
0
Rubén Isaac Palomino Rivasplata What is the purpose of posting this code here? Please use code playground links to post code.
8th Jun 2025, 1:51 AM
Keith
Keith - avatar
0
That's an awesome way to explore Python! Lists are incredibly versatile, and once you start experimenting, you can do some really fun things. One cool way I've seen lists used is in a **simple to-do list manager**. You can create a list to store tasks, use `.append()` to add new tasks, `.remove()` to delete completed ones, and slicing to display certain parts of the list. You could even add some interactivity using `input()` to let users manage their tasks dynamically. Another fun example is a **random story generator**. You can store different elements—characters, settings, and actions—in separate lists and use `random.choice()` to pick one from each list to create a quirky little story. Since you're exploring slicing, have you tried reversing a list with `my_list[::-1]`? It's a neat trick that can be handy in many projects! What kind of projects are you thinking about? Maybe I can help brainstorm something unique!
9th Jun 2025, 2:14 PM
Dineth Dilshan
Dineth Dilshan - avatar
0
I made a simple quote generator using a list of quotes and random.choice() — it prints a new one each time. Also tried a mini to-do list app using .append() and .remove(). https://www-dgcustomerfirst.com
16th Jun 2025, 9:40 AM
sally476pollard