let randomCode = (Math.random() + 1).toString(36).substring(7);
console.log("random code :", randomCode);
import random
letters = ('a','b','c')
print.random(random.choice(letters))
<html>
<head>
<title> Random String Generator </title>
</head>
<script>
function randomStringGenerator() {
var characters = "ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz";
//specify the length random new string
var lenString = 8;
var randomstring = '';
for (var i=0; i<lenString; i++) {
var rnum = Math.floor(Math.random() * characters.length);
randomstring += characters.substring(rnum, rnum+1);
}
document.getElementById("randomfield").innerHTML = randomstring;
}
</script>
<body>
<center>
<h2 style="color: red"> Random String Generator </h2>
<h3> Click the button to generate a new random string </h3>
<form name="randomstring">
<input type="button" value="Generate " onClick="randomStringGenerator();">
<br><br>
<b><p id="randomfield" style="color: blueviolet"> </p></b>
</form>
</center>
</body>
</html>