Communities for your favorite technologies. Explore all Collectives
Stack Overflow for Teams is now called Stack Internal. Bring the best of human thought and AI automation together at your work.
Bring the best of human thought and AI automation together at your work. Learn more
Find centralized, trusted content and collaborate around the technologies you use most.
Stack Internal
Knowledge at work
Bring the best of human thought and AI automation together at your work.
I am translating code from c ++ to python, I met with such a data type:
bool b[110];
How can this be translated into Python? I tried to do something, but in my opinion something is wrong here.
b = [False] * (110)
b
1110x55674af1c1a0
[True, False, False,.....,False]
I don't really see a difference between bool b[110]; and b = [False] * 110. Besides that bool b[110]; only does "Garbage initialization" and python doesn't have anything even remotely similar to that.
b = [False] * 110
Add a comment
Required, but never shown
By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.
Start asking to get answers
Find the answer to your question by asking.
Explore related questions
See similar questions with these tags.
blooks like this:1110x55674af1c1a0, but in Python:[True, False, False,.....,False]