//######################### Scala ##############################
import scala.collection.mutable.ListBuffer
val a: List[String] = List("One", "Two", "Three", "Four")
var b: ListBuffer[String] = ListBuffer()
# Normal for loop
for (i <- a) {
b += i.toLowerCase
}
println(b)
// ListBuffer("one", "two", "three", "four")
// Using map method (Syntactic Sugar)
val c = a.map { _.toLowerCase }
println(c)
// List("one", "two", "three", "four")
########################### Python ###########################
# normal for loop
a = ["One", "Two", "Three", "Four"]
b = []
for i in a:
b.append(i.lower())
print(b)
# ['one', 'two', 'three', 'four']
# Using list comprehension (Syntactic Sugar)
c = [ i.lower() for i in a ]
print(c)
# ['one', 'two', 'three', 'four']