Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I would need something like
{"a"=1,"b"=2,"c"=3,"d"=4}
but python is not able to decode it, it gives me an error message. is there a way around that?
thank you
Replacing the "=" with ":" should work...
Related
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 4 days ago.
Improve this question
Guys can you help me make this work?
enter image description here
I tried putting - str(ware_1)
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
How do I config my vscode output to look like the first image?
What I want:
What it actually looks like:
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 3 years ago.
Improve this question
I couldn't find anyway to print the size of an image in bytes.
You can simply use os.
import os
os.path.getsize('test.jpg')
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 3 years ago.
Improve this question
I'm a new programmer and have no idea why this is happening.
You have some amount of spaces before the import pygame text on the first line.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 5 years ago.
Improve this question
My questions refers to a "concatenation" of a Python dictionary. For example: I have a dictionary di = {1:'AB', 2:'BC',3:'CD'}, and I want with one command print(____) to get the output 'ABCD'.
Any suggestions?
Try This One.
print(''.join(str(e) for e in list(sorted(set(di[1]+di[2]+di[3]))))
Hope that this is what you wanted
di = {1:'AB', 2:'BC',3:'CD'}
print((di[1]+di[2]+di[3]).replace((di[2]),''))