Thread Shed confusion

Hi, I don’t understand this task number 8, I am getting stucked to transform into code.
Someone help me to understand this.

exercise link is :

if you do a call for help(list) and help(str), you’ll see what the error message means that list object has no attribute strip. you’ll have to re-think it from that point. (meaning you can only strip strings.

so the goal is: how does one call the strings to be stripped in the manner they are asking for?

side note: a google search of the errors usually yields a ton of information right away about the nature of the problem (it’ll usually mean you will learn more about the mechanics of whatever raised the error). When that fails, then the layers of nuance begin.

1 Like

In this task, why do we need two for loops?

The way they present the task is giving you orders.

Another way to think about it, is to try to understand the end goal and work backwards logically. Draw out a scheme on paper. It really is more helpful to do these longer step projects this way (slower but you learn more, in the long term, it will be often faster this way, and you’ll learn to judge when you can do things without planning ahead too far).

They ask for the for loops as a means to an end, but many times there are other more efficient ways to do it.

In the later chapters of lessons, you might get stuck if you don’t have a system for structuring each project.

1 Like

hi there, can you help me on Teamviewer?

There’s a video tutorial at the bottom if you need it!

Otherwise, if you’re not doing it already: I suggest you put print statements after every action that affects elements to follow the state of your code. It will become clear to you where the problems in your code are.

You can also look at other instances of this same thread topic on this forum and learn from those! like this one Thread Shed Problems


You are misunderstanding what is being asked

for x in daily_transactions_split:
    for y in x:

Need to check your syntax.

@psmilliorn - I just want to say thank you…THANK YOU
I stopped the exercises for the day and started searching the forums because I had the exact same issue as @thiyamsureshsingh and I thought I would run down the road screaming.

Too many times the answer is so simple (and my code could be simpler too).

@moderators I wish that I could view the solution to the step I’m stuck on without ruining the possibility of working on the other steps in the exercise

I just want to learn to code :frowning:

1 Like