#pythonprogramming hi! Anyone using this tag can help me with a question about #python ? I have a github link to my non-working little game.
#learnpython
@josemachete79 probably! what's your question?

@elduvelle hi! Take a look to this, please: https://github.com/JoseMachete/learning_python/blob/main/highest_card.py

The first part of the game works, it draws and prints two random cards. The problem comes when the if /elif statements have to print the results. I'm trying to pass lists made of functions and that second block it just prints nothing. What am I missing here?
Thank you in beforehand!

@josemachete79
hmm,
this use of functions as variables is very strange to me, but if you say that the first part works then that's great.

I think one of the problems could be that you use '==' here

if player_card == aces and computer_card == aces:

when you should probably use 'in' instead (aces is a list, not a single card)

however because the things that are inside 'aces' are actually functions, I'm not sure that this will work.. I guess I'd have coded this all using strings instead?

let me know if this helps? if not could you print the contents of 'player_card' and 'aces'?

@elduvelle thanks for ur reply ^^ the thing is, in the first part, the functions drawing the cards and their return ' name' ,is printed for player_card and computer_card.
But then, when I try to print(aces) to get all the funcions listed inside, I get a weird output. (Something like: <function diam_ace ax070>) Tomorrow morning I will try your suggestion and report back :)
@josemachete79
oh yes so that weird thing is a pointer to the function, I think, and I don't know if you can compare function pointers with '==' or even 'in' but who knows, it might work?
@elduvelle I'll try it with a coffee in the morning :))
I made a paper/rock/scissors/lizard/spock game using list of strings, no little ascii drawings, and runs smooth. The thought behind the functions for printing drawings is bc there are 52 poker cards :S maybe I could replicate the small game with 52 plain text names in string lists, then def a function that prints the drawn cards...
I'm just in my first days of python after C and some Shell scripting. I feel threading quicksands xD