Input:
intersperse(666, ["once", "upon", "a", 90, None, "time"])
Output:
["once", 666, "upon", 666, "a", 666, 90, 666, None, 666, "time"]
What's the most elegant (read: Pythonic) way to write intersperse
?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…