If I understand your question correctly:
<?php
global $product$product;
$sizes = $product->get_attribute( 'size' ); $sizes = explode(", ",$sizes); ?>
<?php if($sizes[0]!=''){ // if product sizes are defined ?>
<ul class="list-group">
<?php foreach($sizes as $size){ ?>
<li class="list-group-item"><?php echo $size; ?></li>
<?php } ?>
</ul>
<?php } ?>