PASTEBIN
| #1 paste tool since 2002
create new paste
tools
api
archive
faq
PASTEBIN
create new paste
trending pastes
sign up
login
my alerts
my settings
my profile
Don't like ads?
PRO users
don't see any ads ;-)
Public Pastes
Untitled
11 sec ago
Untitled
14 sec ago
Untitled
16 sec ago
Untitled
C# | 25 sec ago
Untitled
22 sec ago
Untitled
25 sec ago
Untitled
27 sec ago
simple blue
38 sec ago
Untitled
By: a guest on
Aug 1st, 2012
| syntax:
None
| size: 0.24 KB | hits: 15 | expires: Never
download
|
raw
|
embed
|
report abuse
|
print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
Python: Reducing memory usage of dictionary
i_love TAB 10
love_you TAB 12
loadData(file):
data = {}
for line in file:
first, second = line.split('t')
data[first] = int(second) #or float(second)
return data
create a
new version
of this paste
RAW Paste Data
Python: Reducing memory usage of dictionary i_love TAB 10 love_you TAB 12 loadData(file): data = {} for line in file: first, second = line.split('t') data[first] = int(second) #or float(second) return data