import Foundation
var range: Range<Int> = Range(start: 0, end: 5)
var range1 = 0...5
var range2 = 0..<5
print(range)
print(range1)
print(range2)
//打印结果
//0..<5
//0..<6
//0..<5
//Range只用于Int
//var range: Range<String> = Range(start: 0, end: 5)
// Error: Type 'String' does not conform to protocol 'ForwardIndexType'
|