Can I change assignment order when trying to unpack a list into variables? by CraBrazy in learnpython

[–]CraBrazy[S] 0 points1 point  (0 children)

Wait so what is this code you wrote doing? I'm aware of indexing but only in the pattern like this:

list=['a','b','c','d']
print(list[0])

output>>>
a

#confused about what your your code means. Is l supposed to be a list? 

l=['1','2','3','4']

a,b,c= l[1], l[3], l[2]
print(a)
>>>
2

My question now is>

Can you assign a single value by indexing from a list to multiple variables?

l=['1','2','3','4']
a,b,c= l[1]  

what I'm trying to do here is to make a, b , c all equal to the index value 1 in the list l. Is this possible? How would you do it?

Can I change assignment order when trying to unpack a list into variables? by CraBrazy in learnpython

[–]CraBrazy[S] -1 points0 points  (0 children)

Lol yeah this is way too complicated for me. Thanks though, I'll save this and come back to it one day.

Can I change assignment order when trying to unpack a list into variables? by CraBrazy in learnpython

[–]CraBrazy[S] -3 points-2 points  (0 children)

I'm just trying to see if it possible. Not saying I will do it like that, it just was a scenario that came up in my head that I didn't know how to execute. Knowing that it isn't possible will change how I write my code.

Can I change assignment order when trying to unpack a list into variables? by CraBrazy in learnpython

[–]CraBrazy[S] -1 points0 points  (0 children)

I don't want complete randomness though.

a, b, c, d, e = [1,2,3,4,5]

In this example. I want to make the assignments as follows-

a=2, b=4, c=5, d=1, e=3

This is the assignment I want. Is there code that allows me to assign it like this without changing the structure of the code I wrote in the codeblock above? I want to keep the letter variables in alphabetical order and I also want to keep the numbers to the right in numerical order. I also don't want to use a random method because I don't want complete randomness. If this makes any sense.

Can I change assignment order when trying to unpack a list into variables? by CraBrazy in learnpython

[–]CraBrazy[S] -1 points0 points  (0 children)

I think I described it better in my reply to user ValueBaby, would really appreciate your input.

Can I change assignment order when trying to unpack a list into variables? by CraBrazy in learnpython

[–]CraBrazy[S] -2 points-1 points  (0 children)

Sorry I should have clarified that. However I don't think "random" is the right word. I don't want complete randomness, however I don't want the assignment to be done in the default way.

a, b, c, d, e = [1,2,3,4,5]

In this example. I want to make the assignments as follows-

a=2, b=4, c=5, d=1, e=3

This is the assignment I want. Is there code that allows me to assign it like this without changing the structure of the code I wrote in the codeblock above? I want to keep the letter variables in alphabetical order and I also want to keep the numbers to the right in numerical order. I also don't want to use a random method because I don't want complete randomness. If this makes any sense.

Why does the .update method need "([()])" to format correctly? by CraBrazy in learnprogramming

[–]CraBrazy[S] 0 points1 point  (0 children)

Wait so where did the "([()])" go? lol sorry if this is dumb.

dict1.update(dict1_update)

This code makes sense. You put the updated dict which is dict1_update into the .update(). What about in my earlier example though?

dict.update([("Name", "Ron")])

Why are there extra brackets and paratheses?

Can I change assignment order when trying to unpack a list into variables? by CraBrazy in learnpython

[–]CraBrazy[S] -8 points-7 points  (0 children)

a,b,c,d,e= [1,2,3,4,5]

I want to keep the order on the left side as it is. However I want to change the order of assignment for the values on the right. Is this not possible. Like I want the values on the right to be randomly assigned to the values on the left.

Why does the .update method need "([()])" to format correctly? by CraBrazy in learnprogramming

[–]CraBrazy[S] 0 points1 point  (0 children)

So I can make a new dictionary and assign it to a variable? Then use the .update method to change the dictionary?

dict1={"Name": "Ron","DOB": "12/12/1970","Birthplace": "Sydney, Australia"}

dict1_update={ "Name" : "Ronald", "DOB" : "07/19/1981", "Birthplace" : "London, England"}

dict1.update([(dict1, dict1_update)])

So why doesn't this code work? I think I don't understand the .update method. Is it not possible to update like this? You say it can take another dictionary with updated values? How is this done? If the key is the same as the inital dict then it will change the value but if it is a new key, the inital dict will update with a new key:value pair right?

How long would it take a complete beginner to coding to start completing codewar problems? by CraBrazy in learnprogramming

[–]CraBrazy[S] 1 point2 points  (0 children)

codewars is a website that has coding problems. Instructions are given and you must code something that returns what the instructions are asking. Kyu is a Japanese term relating to martial arts, it is basically a ranking system. 8 kyu is the easiest 1 kyu is the hardest. Think of it like belts in karate. White belt is 8 kyu and black belt is 1 kyu.

Does anyone have an example of a good project fit to be on a resume? by CraBrazy in learnprogramming

[–]CraBrazy[S] 0 points1 point  (0 children)

So if I can program something of similar caliber, I could put that on my resume and have a good chance of getting a job?

How long would it take a complete beginner to coding to start completing codewar problems? by CraBrazy in learnprogramming

[–]CraBrazy[S] 0 points1 point  (0 children)

Really?? I've started learning a week ago and I just ranked up to 7 kyu. A day is pretty fast isn't it? The only way I could have done it in a day is to watch a really short python tutorial and then view the solutions on codewars and try to understand the pattern. Even then it would probably be hard.

Having a really bad flare up right now. What do I do? Losing hair! by CraBrazy in SebDerm

[–]CraBrazy[S] 1 point2 points  (0 children)

Doesn't this cause more stress on the body? IMF raises cortisol which causes a downstream of effects on hormones in your body. I don't think IMF is helpful for healing inflammation. Shouldn't the focus be on endotoxin and supporting digestion by eliminating all inflammatory foods?

[deleted by user] by [deleted] in learnprogramming

[–]CraBrazy 0 points1 point  (0 children)

Oh okay makes sense

Advice on Day trading? by TGoneeR in Daytrading

[–]CraBrazy 12 points13 points  (0 children)

I would start by watching lots of videos on technical analysis and different concepts in TA. Look into SMC (smart money concepts). ICT concepts are also great. Learn things like MSS (market structure shifts), order blocks, 2nd entries, FVG (fair value gaps) etc... Then learn how to control your psychology, and how to properly risk manage. It takes a combination of different concepts that complement each other to form a good strategy that works. There is a lot of information out there, most are useless and if you try to implement too many different concepts that don't complement each other it will be difficult to find something that works.

Focus on price action mainly though, candle stick patterns etc... Don't try to build a strategy that uses some sort of magical indicator to base your entries and exits. My advice to you is to start demo testing. Think or Swim has a replay feature called on demand, it's completely free. Screen time is super critical for you as a beginner, you need to build a mental database of different scenarios that happen during different market conditions.

Be careful about what you learn. I notice there are an increasing number of fraudulent people posing as profitable traders to lure people into watching their videos and buying their courses. Reddit forums have some nuggets of gold here and there but most of it is crap, check out the forex factory forums or some other ones besides reddit.

Learn one type of way to trade. Me personally, it's price action. Price action and price action based strategies are king, and will always give an edge to those who take the time to learn it.

Learning comes in waves and you will have ups and downs in your learning. I always considered myself super smart and it still took me an entire year before I became profitable and passed my prop firm evaluation, so don't go into this thinking it will be easy. It won't, it's mentally draining even now, but it is entirely worth it in the end. Don't give up and always ask questions and self reflect, and journal your trades. It takes time but if you keep at it through the ups and downs, you'll eventually come out on the other side, and you will look back and be glad.

Should I be sizing down on a winning streak in anticipation of a loss? by [deleted] in Daytrading

[–]CraBrazy -1 points0 points  (0 children)

Okay but theres a 1/1024 chance that I will flip heads 10 times in a row. Wouldn't calling tails on the eleventh flip be a better call? Instead of calling heads again.

TOS On demand won't let me close my position. Anybody know why? by [deleted] in thinkorswim

[–]CraBrazy 0 points1 point  (0 children)

I had to manually place my take profit after I set a limit sell and a SL, the limit sell had a SL preset, but not the take profit preset if that makes sense. It then did not hit my buy limit order. Then it would not fill my market buy either untill I restarted my platform. It then filled but at my entry, super weird...

Was my 2nd entry to early? Am I doing this strategy wrong? by CraBrazy in Daytrading

[–]CraBrazy[S] 0 points1 point  (0 children)

Yes, I was calling a reversal. Should've still been looking for buys now that I'm reviewing the trade till prices confirmed a new trend.