Skip to content

Instantly share code, notes, and snippets.

import string
with open('somefile.txt', 'r') as infile:
fread = infile.readlines()
d = {}
for x in fread:
if "\xe2\x80\xa2 " in x:
x = x.strip()
val = x.split("\xe2\x80\xa2 ")
d[value].append(val[1])
@Back2Basics
Back2Basics / deep_eq.py py3.x
Last active March 7, 2017 09:29 — forked from samuraisam/deep_eq.py
Deep Equality Test for Nested Python Structures
# Copyright (c) 2010-2013 Samuel Sutch [samuel.sutch@gmail.com]
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in