swift from 1 to 01

Swift
import Foundation

for myInt in 1 ... 3 {
    print(String(format: "%02d", myInt))
}
Source

Also in Swift: