Try searching the forum before posting, this has been asked and answer plenty of times. Your best solution is to purchase a hardware unlock online for a few $$ and have ur iPhone permanently unlock. Never have to worry about losing ur unlock with iOS updates.
You can unlock your iPhone 4 which is locked on Tele2 Sweden from Wicked Unlock.com . Here, you should give your IMEI number then they unlock your iPhone by using the remote unlocking service.