Ubah Daftar ke Int di Python
test_list = list(map(int,test_list))
Ugliest Unicorn
test_list = list(map(int,test_list))
res = [int(x) for x in str(num)]
num = [1, 2, 3, 4]
s = [str(i) for i in num] # Converting integers into strings
result = str("".join(s)) # Join the string values into one string
print(result)
integers = [1, 2, 3]
strings = [str(integer) for integer in integers]
a_string = "". join(strings)
an_integer = int(a_string)
print(an_integer)
//Solution by Technoname.com
import java.util.Scanner;
public class Technoname
{
public static void main(String[] args)
{
Scanner sc = new Scanner(System.in);
String s =sc.nextLine();
int N = 0, E=0, W= 0, S= 0 ,i;
for (i=0;i<s.length();i++)
{
if(s.charAt(i)=='N')
{
N++;
}
if(s.charAt(i)=='E')
{
E++;
}
if(s.charAt(i)=='W')
{
W++;
}
if(s.charAt(i)=='S')
{
S++;
}
}
if( N==S && E==W )
{
System.out.println("Returned successfully");
}
else
{
System.out.println("Not Returned successfully");
}
}
}
Question 3 :