Dear forum members
Is there in Swift any elegant and simple function such as those found in Python or similars? Something that perform on an user defined data structure type, as follows:
// data structure and definition with initiation values
client[(1,”any text here”),(2,”any other text”),…..,(40,”some text")]
import random
repeat until exit_char {
r = random.randint(1…40)
print(Client,r,txtr)
// whatever other action here
}
Thank you
Jorge Guillermo Forero