I tried Python's "*" character output in another language

I started Python, but I was a little impressed with the following notation.

hoge.py


print u"failed." * 5 # 結果:failed.failed.failed.failed.failed.

So I was wondering if I could get the same result with the same notation in other languages, so I tried it.


hoge.rb


puts "failed." * 5 # 結果:failed.failed.failed.failed.failed.

hoge.exs


IO.puts "failed." * 5 #Result: warning: this expression will fail with ArithmeticError

hoge.pl


print "failed." * 5; #Result: 0

hoge.php


print "failed." * 5; //Result: 0

hoge.playground


println("failed." * 5) //Result: Not executable

It's surprisingly useless, isn't it? If I have a chance to touch a language I haven't tried this time, I'd like to try the same notation!

Recommended Posts

I tried Python's "*" character output in another language
I tried 100 language processing knock 2020
I tried to illustrate the time and time in C language
I tried 100 language processing knock 2020: Chapter 3
I tried running GAN in Colaboratory
I tried 100 language processing knock 2020: Chapter 1
I tried Line notification in Python
I tried 100 language processing knock 2020: Chapter 2
I tried 100 language processing knock 2020: Chapter 4
I tried to implement PLSA in Python
I tried to implement PLSA in Python 2
I tried putting virtualenv in Cygwin environment
I tried to implement ADALINE in Python
I tried a functional language with Python
I tried to implement PPO in Python
I tried natural language processing with transformers.
I tried shortening Python's FizzBuzz little by little
[Python] [Natural language processing] I tried Deep Learning ❷ made from scratch in Japanese ①
I tried playing a typing game in Python
I tried to integrate with Keras in TFv1.1
I tried simulating the "birthday paradox" in Python
I tried the least squares method in Python
[Memo] I tried a pivot table in Python
I tried to extend Python's Active Record framework
I tried to touch Python's GUI library "PySimple GUI"
I tried to implement TOPIC MODEL in Python
I tried using Pythonect, a dataflow programming language.
I tried non-blocking I / O Eventlet behavior in Python
I wrote the hexagonal architecture in go language
I tried to generate a random character string
I tried adding a Python3 module in C
I tried to implement selection sort in python
I tried scraping
I tried PyQ
I tried AutoKeras
I tried papermill
I tried django-slack
I tried Django
I tried spleeter
I tried cgo
I tried to create a class to search files with Python's Glob method in VBA
Draw a graph in Julia ... I tried a little analysis
I tried using google test and CMake in C
I tried using TradeWave (BitCoin system trading in Python)
I tried to implement a pseudo pachislot in Python
I tried to implement Dragon Quest poker in Python
I tried to implement GA (genetic algorithm) in Python
Output a character string with line breaks in PyYAML
I tried to summarize how to use pandas in python
Work memo that I tried i18n with Flask app
I tried to identify the language using CNN + Melspectogram
[Natural language processing] I tried to visualize the hot topics this week in the Slack community
[Natural language processing] I tried to visualize the remarks of each member in the Slack community