J
Johannes Bauer
Hello group,
I'm just starting with Python and am extremely unexperienced with it so
far. Having a strong C/C++ background, I wish to do something like
if (q = getchar()) {
printf("%d\n", q);
}
or translated to Python:
if (p = myfunction()):
print p
However, this "assignment and comparison" is not working. What's the
"Python way" of doing this kind of thing?
Thanks a lot,
Johannes
I'm just starting with Python and am extremely unexperienced with it so
far. Having a strong C/C++ background, I wish to do something like
if (q = getchar()) {
printf("%d\n", q);
}
or translated to Python:
if (p = myfunction()):
print p
However, this "assignment and comparison" is not working. What's the
"Python way" of doing this kind of thing?
Thanks a lot,
Johannes