Skip to content
Advertisement

Tag: function

Unexpected indentation when return in python

when I try to return but I got an error in 2nd return signup_result & return login_result https://github.com/microsoft/pyright/blob/main/docs/configuration.md#reportUndefinedVariable here is utils.py I also try to tab 2 times to avoid indentation error in return signup_result & return login_result but still got the same error Unexpected indentationPylance Answer The cognito_login() function contains only one line of code return login_result because that

Func for temporary text in many tkinter Entry widget?

I want to put a temporary text in more than 1 entry with tkinter, but my func is not working. I have this situation: Its working, but… I wan’t to use the same func for other entrys, like this one: Any ideas on how to make it universal? Answer Here’s a PlaceholderEntry widget that should to what you want You

Get variables from function input and text after

So id like to make varibles from my function input So basically, the if statement should check if the varible is True or not. And i want to use the function input + ”-outcome” to check. Here is an example, to make you understand my problem better! I’ve tried to find a solution but don’t find it anywhere Thanks! Answer

valid and corrupt lines from file

As you can read, the function validate_data should check the imported file for corrupt and valid lines, then append them to the correct list, and print them. It works, except that, as you can probably see, the lines will not print in a single line. I’m sure I have to make two other lists to append the correct data into

Advertisement