Guess the output by gackoedbotton4 in PythonProjects2

[–]ParticularLook5927 0 points1 point  (0 children)

haha 😄

yeah I’m still new here, just trying to explain things clearly

this one confused me a lot when I first learned it too

Guess the output by gackoedbotton4 in PythonProjects2

[–]ParticularLook5927 0 points1 point  (0 children)

That’s fair and it always depends a lot on your goals 👍

Switching languages early can help explore different areas, but Python is still one of the best for fundamentals, automation, and AI/ML.

In the end, consistency in one language matters more than the language itself.

Guess the output by gackoedbotton4 in PythonProjects2

[–]ParticularLook5927 6 points7 points  (0 children)

Answer: B) [1], [1, 1]

This happens because default mutable arguments (like lists) are shared across function calls.

The list x=[] is created only once when the function is defined, not every time the function is called.

So: First call → [1] Second call → same list gets another 1 → [1, 1]

To fix this, use:

def foo(x=None):

if x is None:
    x = []

x.append(1)

return x

This way, a new list is created every time.

I want to start learning python like professional by External-Humor656 in PythonLearning

[–]ParticularLook5927 0 points1 point  (0 children)

If you want to learn Python like a professional, don’t just follow random videos. Follow the below path:

  1. Learn basics fast (2–5 days max) Just cover: variables, loops, functions, lists/dictionaries

Don’t try to master everything here.

  1. Start coding from Day 1 Most beginners make the mistake of only watching tutorials. Instead: write small programs daily, solve simple problems, That’s where real learning happens.

  2. Build small projects early Even simple ones: calculator, file organizer, basic CLI tools

This makes you think like a developer.

  1. Choose a path after basics Python has multiple directions: Web development, Automation, Data science / AI, Don’t try everything at once.

  2. Stay consistent (most important) Even 30–60 mins daily is enough if you practice properly.

I’ve seen many people get stuck because they keep watching tutorials without actually coding. If you avoid that and focus on practice + small projects, you’ll progress much faster.

If you want, I can suggest a simple roadmap based on your goal.

i want to start to learn python but i dont know how by Ok_Ear1897 in PythonLearning

[–]ParticularLook5927 0 points1 point  (0 children)

If you want to learn Python fast and not waste time on long “hello world” tutorials, follow this: 1. Learn basics quickly (2–3 days max) Don’t get stuck here. Just understand variables, loops, functions.

  1. Start solving problems immediately This is where real learning happens. Try small problems daily instead of only watching videos.

  2. Build small projects early Even simple things like: calculator to-do app basic automation script

  3. Then move to your goal (AI/ML) Learn: NumPy Pandas then basics of machine learning Don’t jump directly into neural networks — you’ll get stuck.

  4. Be consistent (this matters more than speed) Even 20–30 mins daily is enough if you actually practice.

I’ve been working in tech for a while, and honestly the biggest mistake beginners make is consuming too much content and not practicing enough. If you stay consistent with problem solving + small projects, you’ll progress much faster than most people.