Timeline for Sets in python and transformation a list into a set [closed]
Current License: CC BY-SA 4.0
Post Revisions
8 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| 2 days ago | comment | added | Ben Grossmann |
You could get this to work by replacing set (which you probably shadowed) with frozenset (which you probably haven't)
|
|
| 2 days ago | comment | added | John Gordon |
Somewhere in your code you wrote something like this set = {a, b, c}, which overwrites the set type function.
|
|
| 2 days ago | history | closed |
jonrsharpe deceze♦ |
Not suitable for this site | |
| 2 days ago | comment | added | jonrsharpe | Likely dupe: stackoverflow.com/q/31202534/3001761 | |
| 2 days ago | comment | added | simon |
Off-topic: "repeaterive" (as in repeaterive_numbers) is not a word. Maybe you mean "repetitive" or "repeating"?
|
|
| 2 days ago | comment | added | jonrsharpe |
On which line - set(repeaterive_numbers)? That suggests you've shadowed set somewhere with set = ..., but given that's not in what you've shown we can't say more than that. (I will say all of what you're doing could be trivially done with set operations if you didn't shadow it, or used a literal/set comprehension - it's just an intersection {rd.randrange(0, 60) for _ in range(12)} & {rd.randrange(0, 60) for _ in range(25)}.)
|
|
| S 2 days ago | review | First questions | |||
| 2 days ago | |||||
| S 2 days ago | history | asked | Mohamad Ghiassy | CC BY-SA 4.0 |