Bad operand type for unary +: ‘str’

You say that if int(splitLine[0]) > int(lastUnix): is causing the trouble, but you don’t actually show anything which suggests that. I think this line is the problem instead: Do you see why this line could cause that error message? You want either or not You’re asking Python to apply the + symbol to a string like +23 makes a positive 23, … Read more

Is there a way to return literally nothing in python?

There is no such thing as “returning nothing” in Python. Every function returns some value (unless it raises an exception). If no explicit return statement is used, Python treats it as returning None. So, you need to think about what is most appropriate for your function. Either you should return None (or some other sentinel value) and add appropriate logic … Read more

Removing numbers from string

Would this work for your situation? This makes use of a list comprehension, and what is happening here is similar to this structure: As @AshwiniChaudhary and @KirkStrauser point out, you actually do not need to use the brackets in the one-liner, making the piece inside the parentheses a generator expression (more efficient than a list … Read more

Unresolved reference issue in PyCharm

Manually adding it as you have done is indeed one way of doing this, but there is a simpler method, and that is by simply telling pycharm that you want to add the src folder as a source root, and then adding the sources root to your python path. This way, you don’t have to hard code things into … Read more